package com.ruoyi.part.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.part.domain.SysConfig;
import com.ruoyi.part.service.ISysConfigService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shenli
 * @version v0.1.0
 * @since 2025/10/23 19:10
 */
@RestController
@RequestMapping("/config")
public class SysConfigController extends BaseController {

  @Resource
  private ISysConfigService configService;

  @RequiresPermissions("system:config:list")
  @GetMapping("/list")
  public TableDataInfo list(SysConfig config) {
    System.out.println("新建的功能模块被访问到了：list");
    startPage();
    List<SysConfig> list = configService.selectConfigList(config);
    return getDataTable(list);
  }

}
